<?php
// +----------------------------------------------------------------------
// | snake
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai <1902822973@qq.com>
// +----------------------------------------------------------------------
namespace app\common\model;

use think\Model;

class UserAccountRecord extends Model
{
    public static $addAmount = [0, 4, 5];
    public static $_type = [
        '0' => '充值',
        '1' => '提现',
        '2' => '投票发放',
        '3' => '拉票发放',
        '4' => '投票获取',
        '5' => '拉票获取'
    ];

    // 获取交易记录
    public function allAccountRecord($map, $offset, $limit)
    {
        return $this->where($map)->limit($offset,$limit)->order('create_time desc')->select();
    }
}
